/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.bs.Beans;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Bone
 */
@Entity
@Table(name = "folha_ppp_exame_medico")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "FolhaPppExameMedico.findAll", query = "SELECT f FROM FolhaPppExameMedico f")})
public class FolhaPppExameMedico implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(nullable = false)
    private Integer id;
    @Column(name = "DATA_ULTIMO")
    @Temporal(TemporalType.DATE)
    private Date dataUltimo;
    private Character tipo;
    @Column(length = 50)
    private String natureza;
    private Character exame;
    @Column(name = "INDICACAO_RESULTADOS", length = 50)
    private String indicacaoResultados;
    @JoinColumn(name = "ID_FOLHA_PPP", referencedColumnName = "ID", nullable = false)
    @ManyToOne(optional = false)
    private FolhaPpp idFolhaPpp;

    public FolhaPppExameMedico() {
    }

    public FolhaPppExameMedico(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Date getDataUltimo() {
        return dataUltimo;
    }

    public void setDataUltimo(Date dataUltimo) {
        this.dataUltimo = dataUltimo;
    }

    public Character getTipo() {
        return tipo;
    }

    public void setTipo(Character tipo) {
        this.tipo = tipo;
    }

    public String getNatureza() {
        return natureza;
    }

    public void setNatureza(String natureza) {
        this.natureza = natureza;
    }

    public Character getExame() {
        return exame;
    }

    public void setExame(Character exame) {
        this.exame = exame;
    }

    public String getIndicacaoResultados() {
        return indicacaoResultados;
    }

    public void setIndicacaoResultados(String indicacaoResultados) {
        this.indicacaoResultados = indicacaoResultados;
    }

    public FolhaPpp getIdFolhaPpp() {
        return idFolhaPpp;
    }

    public void setIdFolhaPpp(FolhaPpp idFolhaPpp) {
        this.idFolhaPpp = idFolhaPpp;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof FolhaPppExameMedico)) {
            return false;
        }
        FolhaPppExameMedico other = (FolhaPppExameMedico) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.bs.Beans.FolhaPppExameMedico[ id=" + id + " ]";
    }
    
}
